<?php

namespace App\Model\Roles;

use EasySwoole\Spl\SplBean;

class RolesBean extends SplBean{

    protected $id;
    protected $name;
    protected $note;
    protected $rules;
    protected $created_at;

    public function getId(){
        return $this->id;
    }

    public function getName(){
        return $this->name;
    }

    public function getRules(){
        return $this->rules ? json_decode($this->rules) : [];
    }

    public function setCreatedAt($created_at){
        $this->created_at = $created_at;
    }

}
